<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<style>
	div {
		width: 200px;
		border: 1px solid red;
		padding: 30px;
	}
	
	p {
		border: 1px solid red;
		text-align: center;
		padding: 30px;
	}
</style>

<script>
	function f1(e) {
		alert("按钮");
		//取消冒泡
		//IE:e={cancelBubble:false}
		//其他:e{stopPropagation:function(){}}
		if(e.stopPropagation){
			e.stopPropagation();
		}else{
			e.cancelBubble=true;	
		}
		
		
		
	}
</script>

</head>
<body>
	<div onclick="alert('div');">
		<p>
			<input type="button" value="按钮1" />

		</p>

	</div>
</body>
</html>